ISO/IEC 13818-7 International Standard MPEG-2 Advanced Audio Coding (AAC) is known as one example of a coding system in which an audio signal is converted to frequency-domain and the converted audio signal in the frequency domain is encoded. The AAC system is employed as an audio coding system such as one-segment broadcasting or digital AV apparatuses.
FIG. 1 illustrates a configuration example of an encoder 1 that employs the AAC system. The encoder 1 illustrated in FIG. 1 includes a MDCT (modified discrete cosine transform) section 11, a psychoacoustic analyzing section 12, a quantization section 13, and a Huffman coding section 14.
In the encoder 1, the MDCT section 11 converts an input sound into an MDCT coefficient composed of frequency domain data by the MDCT. In addition, the psychoacoustic analyzing section 12 conducts a psychoacoustic analysis on the input sound to compute a masking threshold for discriminating between acoustically significant frequencies and acoustically insignificant frequencies.
The quantization section 13 quantizes the frequency domain data by reducing the number of quantized bits in acoustically insignificant frequency domain data based on the masking threshold, and allocates a large number of quantized bits to acoustically significant frequency domain data. The quantization section 13 outputs a quantized spectrum value and a scale value, both of which are Huffman encoded by a Huffman encoding section 14 to be output from the encoder 1 as coded data. Notice that the scale value is a number that represents the magnification of a spectrum waveform of the frequency domain data converted from the audio signal and corresponds to an exponent in a floating-point representation of an MDCT coefficient. The spectrum value corresponds to a mantissa in the floating-point representation of the MDCT coefficient, and represents the aforementioned spectrum waveform itself. That is, the MDCT coefficient can be expressed by “spectrum value*2scale value”.
FIG. 2 illustrates a configuration example of an AAC system decoding apparatus 2. The decoding apparatus 2 includes a Huffman decoding section 21, an inverse quantization section 22, and an inverse MDCT section 23. The decoding apparatus 2 receives the coded data encoded by the encoder 1 illustrated in FIG. 1, and the coded data are then converted into a quantization value and a scale value by the Huffman decoding section 21. The inverse quantization section 22 converts the quantization value and scale value into inverse quantization values (MDCT coefficient), and the inverse MDCT section converts the MDCT coefficient to a time domain signal to output a decoded sound.
Notice that Japanese Laid-open Patent Publication No. 2006-60341, Japanese Laid-open Patent Publication No. 2001-102930, Japanese Laid-open Patent Publication No. 2002-290243, and Japanese Laid-open Patent Publication No. H11-4449 are given as related art documents that disclose technologies relating to quantization error correction.
When the quantization section 13 in the encoder 1 of FIG. 1 quantizes the MDCT coefficient, a quantization error illustrated in FIG. 3 may be generated. FIG. 3 illustrates a case where the MDCT coefficient in a post-quantization is larger than that in a pre-quantization; however, there is also a case where the MDCT coefficient in the post-quantization is smaller than that in the pre-quantization.
In general, the quality of a decoded sound may not be affected by the presence of the quantization error. However, in a case where an input sound has a large amplitude (approximately 0 dB) and a MDCT coefficient of the sound after quantization is larger than a MDCT coefficient of the sound before quantization, and compressed data of the sound is decoded by the decoding apparatus according to the related art, the amplitude of the sound may become large and may exceed the word-length (e.g., 16 bits) of the Pulse-code modulation (PCM). In this case, the portion exceeding the word-length of the PCM data may not be expressed as data and thus result in an overflow. Accordingly, an abnormal sound (i.e., sound due to clip) may be generated. For example, the sound due to clip is generated in a case where an input sound having a large amplitude illustrated in FIG. 4 that has once been encoded is decoded and the amplitude of the obtained decoded sound exceeds the word-length of the PCM data as illustrated in FIG. 5.
Specifically, the sound due to clip is likely to be generated when an audio sound is compressed at a low bit-rate (high compression). Since the quantization error that results in the sound due to clip is generated at an encoder, it may be difficult for the related art decoding apparatus to prevent the generation of the sound due to clip.